<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户信息注册</title>
</head>
<script>
    function login(){
        var name=document.getElementById("username").value;
        if(name=="admin"){
            submit();
            return ture;
        }else{
            alert("用户名输入错误");
            return false;
        }

    }
    function submit(){
        var introduction= document.getElementById("introduction").value;
        alert(introduction);
    }

</script>
<body>
    <form action="baidu" method="GET" onsubmit="return login()">
        <table style="border-color:green"  border="1" width="500px" cellspacing="0">
        <tr>
            <td>用户名：</td>
            <td> <input id="username" placeholder="请输入用户名..."></td>
        </tr>
        <tr>
                <td> 密码：</td>
                <td> <input type="password"></td>
        </tr>
        <tr>
                <td> 性别:</td>
                <td> <input type="radio" name="sex" checked="checked">男
                    <input type="radio" name="sex">女</td>
        </tr>
        <tr>
                <td>学历:</td>
                <td> <input type="radio" name="education" checked="checked">本科
                    <input type="radio" name="education">专科</td>
        </tr>
        <tr>
                <td> 自我介绍：</td>
                <td> <textarea cols="50" rows="8" id="introduction"></textarea></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="reset" value="清空">
                <input type="submit" value="提交"> </td>
        </tr>
        </table>
    </form>
</body>
</html>